<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "visitlog".
 *
 * @property int $id
 * @property int $uid 用户id
 * @property string $name
 * @property string $url
 * @property string $ua 浏览器类型
 * @property string $ip 登录的ip
 * @property string $request_params 请求的参数
 * @property string $create_time
 */
class Visitlog extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'visitlog';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['uid', 'name', 'url', 'ua', 'ip', 'request_params'], 'required'],
            [['uid'], 'integer'],
            [['create_time'], 'safe'],
            [['name', 'url'], 'string', 'max' => 30],
            [['ua', 'request_params'], 'string', 'max' => 255],
            [['ip'], 'string', 'max' => 65],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid' => 'Uid',
            'name' => 'Name',
            'url' => 'Url',
            'ua' => 'Ua',
            'ip' => 'Ip',
            'request_params' => 'Request Params',
            'create_time' => 'Create Time',
        ];
    }
}
